package com.my12306.train.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.my12306.common.model.vo.PageVo;
import com.my12306.common.util.PageUtils;
import com.my12306.common.util.response.ResponseData;
import com.my12306.train.model.entity.CarriageEntity;
import com.my12306.user.model.vo.CarriageVO;

import java.util.List;

/**
 * 车厢表
 *
 * @author ËÕÄÁÏ¦
 */
public interface CarriageService extends IService<CarriageEntity> {
    PageUtils find(CarriageVO carriageVO, long page, long size);

    /**
     * 分页查询列车类型
     *
     * @param pageVo
     * @return
     */
    PageUtils queryCarriagePage(PageVo pageVo);

    /**
     * 分页查询的总数
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryCarriageCount(PageVo pageVo, int logicDelete);

    /**
     * 批量删除车厢
     *
     * @param carriageIds
     * @return
     */
    ResponseData deleteCarriageBatchByIds(List<Long> carriageIds);

    /**
     * 添加一节车厢
     * @param carriage
     * @return
     */
    Long saveCarriage(CarriageEntity carriage);

    /**
     * 修改车厢信息
     *
     * @param carriage
     */
    void updateCarriageById(CarriageEntity carriage);

    /**
     * 查询未编组的车厢
     * @return
     */
    List<CarriageEntity> queryCarriageNoMar();

    /**
     * 查询车次的所有车厢
     * @param trainCode
     * @param logicDelete
     * @return
     */
    List<CarriageEntity> queryAllCarriageByTrainCode(String trainCode, Integer logicDelete);
}

